<template>
  <view>
    <web-view :src="url"></web-view>

<!--    <iframe ref="fileIframe" style="height: 80vh; width: 100%" :src="url" frameborder="0"></iframe>-->
  </view>
</template>

<script>
export default {
  data() {
    return {
      url: "", // pdf链接
    };
  },
  onLoad(options) {
    console.log('option: ', options)
    let link = decodeURIComponent(options.links);
    console.log('link: ', link)
    // 设置连接地址；
    this.url = `/hybrid/html/pdf/web/viewer.html?file=${link}`;
  },
};
</script>
